from multiprocessing import Process
import os
import time
# name = '太白'
#
# def task():
#     global name
#     name = '刚子sb'
#     print(f'子进程{name}')
#
#
# if __name__ == '__main__':
#     p = Process(target=task)  # 创建一个进程对象
#     p.start()
#     # print('==主开始')
#     time.sleep(3)
#     print(f'主:{name}')



# lst = ['丽丽',]
#
# def task():
#     lst.append('怼姐')
#     print(f'子进程{lst}')
#
# if __name__ == '__main__':
#     p = Process(target=task)  # 创建一个进程对象
#     p.start()
#     # print('==主开始')
#     time.sleep(3)
#     print(f'主:{lst}')


